import { _decorator, Component, Node } from 'cc';
import { EVENT_NAMES } from '../../../../utils/Enums';
import DataMgr from '../../../../utils/DataMgr';
import { AudioManager } from '../../../../common/src/manager/AudioManager';
const { ccclass, property } = _decorator;

@ccclass('PropertyPanel')
export class PropertyPanel extends Component {
    start() {

    }

    update(deltaTime: number) {
        
    }

    // --------------------- 事件 --------------------- //
    // 锤子事件
    private hammerClicked() {
        DataMgr.isUsingHammer = true
        gg.systemEvent.emit(EVENT_NAMES.SET_CLICKED_BRECK_REMIND, true)

        AudioManager.playButton()
    }

    // 交换事件
    private exchangeClicked() {
        DataMgr.isUsingExchange = true
        gg.systemEvent.emit(EVENT_NAMES.SET_CLICKED_EXCHANGE_REMIND, true)

        AudioManager.playButton()
    }

    // 刷新时间
    private refreshClicked() {
        gg.systemEvent.emit(EVENT_NAMES.PROPERTY_REFRESH)

        AudioManager.playSound("audio:common/牌组刷新音效")
    }
}


